export const buildTree = (items, parentId = 0) => {
    let tree = []
    for (let i in items) {
        // debugger;
        if (items[i].top == parentId) {
            const children = buildTree(items, items[i].id)
            if (children.length) {
                items[i].children = children
            }
            tree.push(items[i])
        }
    }
    return tree
}